package 代码记录.指定公司代码练习记录.备战快手;

/**
 * @author zx
 * @create 2023-05-13 12:16
 */
public class 单例模式_双检锁实现 {
    private static volatile 单例模式_双检锁实现 single = null;

    public 单例模式_双检锁实现(){

    }

    public 单例模式_双检锁实现 getInstance(){
        if(single == null){
            synchronized (单例模式_双检锁实现.class){
                if(single == null){
                    single = new 单例模式_双检锁实现();
                }
            }
        }
        return single;
    }
}
